package com.ecoolex.ying.space.ws;

import java.util.Date;

import com.ecoolex.framework.common.exception.BizException;
import com.ecoolex.framework.common.pojo.Page;
import com.ecoolex.framework.common.pojo.Pagination;
import com.ecoolex.framework.common.pojo.Sorting;
import com.ecoolex.ying.space.entity.UserLikeRecord;
import com.ecoolex.ying.space.pojo.UserLikeAndFavoriteDTO;

public interface UserLikeRecordService {

	boolean add(UserLikeRecord record,Integer userId,String createUser) throws BizException;
	
	boolean delete(UserLikeRecord record,String updateUser) throws BizException;
	
	UserLikeRecord getByUserIdAndTypeAndContentId(Integer userId,Integer type,Integer contentId);
	
	Pagination<UserLikeRecord> queryByUserId(Integer userId,Sorting[] sorts,Page page);
	
	Pagination<UserLikeAndFavoriteDTO> queryByContentAuthorUserId(Integer contentAuthorUserId,Date now,Sorting[] sorts,Page page);

	long unreadReceivedUserLikeAndFavoriteCount(Integer userId);
	
	Integer userLikeCountByContentAuthorUserId(Integer userId);
	
	void updateReceivedUserLikeAndFavoriteReadState(Integer readUserId,String createUser);
	
}
